#ifndef __JOIN_THREADS__
#define __JOIN_THREADS__
#include <thread>
#include <vector>

using std::thread;
using std::vector;

// 当一个线程抛出异常 汇合所有线程后再抛出
class join_threads
{
private:
    vector<thread> &_threads;
public:
    explicit join_threads(vector<thread> &threads);
    ~join_threads();
};

#endif